<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>基本对象</title>
</head>
<body>
<h3>从session获取值</h3>
<div th:text="${#session.getAttribute('data')}" style="color: cornflowerblue"></div>
<div th:text="${session.data}" style="color: cornflowerblue"></div>
<div th:text="${#request.getAttribute('username')}" style="color: cornflowerblue"></div>


<script type="text/javascript" th:inline="javascript">
    var scheme = [[${#request.getScheme()}]];
    alert(scheme)
</script>
</body>
</html>